﻿@inherits LayoutComponentBase
@inject IJSRuntime JSRuntime

<div class="page">
    <div class="sidebar">
        <NavMenu />
    </div>

    <main>
        <div class="top-row px-4">
            <Button Type="@ButtonType.Primary" Icon="@IconType.Outline.Github" OnClick="NavigateToGithub" Ghost>View On Github</Button>
        </div>

        <article class="content px-4">
            @Body
        </article>
    </main>
</div>

@code{
    private async Task NavigateToGithub()
    {
        await JSRuntime.InvokeVoidAsync("window.open", "https://github.com/zuozishi/MediaSession.Blazor");
    }
}